Imports System.Data.SqlClient
Imports TaxonNamesInterface
Imports System.ServiceModel

<ServiceContract()> _
Public Interface INames

#Region "Names"
    <OperationContract()> _
    Function ListNameRecords(ByVal searchText As String, ByVal anywhereInText As Boolean) As List(Of Name)
    <OperationContract()> _
    Function GetName(ByVal nameId As Guid) As Name
    <OperationContract()> _
    Function GetNameChildren(ByVal nameId As Guid) As List(Of Name)
    <OperationContract()> _
    Sub InsertUpdateName(ByVal newName As Name, ByVal user As String)
    <OperationContract()> _
    Sub DeleteName(ByVal nameLsid As String, ByVal newNameLsid As String, ByVal user As String)
    <OperationContract()> _
    Sub DeleteNameAuthors(ByVal nameId As Guid)
    <OperationContract()> _
    Function InsertUpdateNameAuthor(ByVal nameAuthorId As Integer, ByVal nameId As Guid, ByVal basAuthors As String, ByVal combAuthors As String, ByVal basExAuth As String, ByVal combExAuth As String, ByVal isCorrected As Boolean, ByVal user As String) As NameAuthor
    <OperationContract()> _
    Function GetNameAuthors(ByVal nameId As Guid) As List(Of NameAuthor)
    <OperationContract()> _
    Function GetNameSynonyms(ByVal nameId As Guid) As List(Of Name)
    <OperationContract()> _
    Function GetNameLSIDs(ByVal pageNumber As Integer, ByVal pageSize As Integer) As List(Of String)
    '<OperationContract()> _
    'Function GetChildNames(ByVal parentNameId As Guid, ByVal recurseChildren As Boolean) As List(Of Name)

#End Region

#Region "Concepts"
    <OperationContract()> _
    Function GetConcept(ByVal conceptId As Guid) As Concept
    <OperationContract()> _
    Sub UpdateConcept(ByVal conc As Concept, ByVal user As String)

#End Region

#Region "ConceptRelationship"

    <OperationContract()> _
    Function GetRelationshipTypes() As List(Of RelationshipType)
    <OperationContract()> _
    Function GetNameConcepts(ByVal nameId As Guid) As List(Of Concept)
    <OperationContract()> _
    Function GetNameConceptRelationships(ByVal nameId As Guid, ByVal includeToConcepts As Boolean) As List(Of ConceptRelationship)
    <OperationContract()> _
    Function GetConceptRelationship(ByVal ConceptRelId As Guid) As ConceptRelationship
    <OperationContract()> _
    Sub UpdateConceptRelationship(ByVal cr As ConceptRelationship, ByVal user As String)
    <OperationContract()> _
    Sub DeleteConceptRelationship(ByVal ConceptRelLSID As String, ByVal NewConceptRelLSID As String, ByVal user As String)

#End Region

#Region "Field Status"

    <OperationContract()> _
    Sub InsertUpdateFieldStatus(ByVal recordId As String, ByVal fieldStatusId As Integer, ByVal statusLevelFk As Integer, ByVal user As String)

#End Region

#Region "Import"
    <OperationContract()> _
    Function GetImportTypes() As List(Of ImportType)
    <OperationContract()> _
    Function InsertUpdateImport(ByVal imp As Import, ByVal user As String) As Boolean

#End Region

#Region "Ranks"
    <OperationContract()> _
    Function GetRanks() As List(Of Rank)
    <OperationContract()> _
    Function RankById(ByVal id As Guid) As Rank
    <OperationContract()> _
    Function RankByName(ByVal name As String) As Rank

#End Region

End Interface
